﻿<UserControl x:Class="EventWindowHandler.Plugin.RecordedEventInfoView"
             xmlns:y="clr-namespace:EventWindowHandler.Plugin"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d">
    <Grid MinWidth="200">
        <Grid.RowDefinitions>
            <RowDefinition Height="24"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid Grid.Row="0" HorizontalAlignment="Left">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="120"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock Text="Recorded Event Info: " VerticalAlignment="Center" />
            <Menu Margin="6,0,0,0" Grid.Column="1" BorderBrush="Black" BorderThickness="1" Padding="2,1,2,1" VerticalAlignment="Center">
                <MenuItem Header="_Options">
                    <MenuItem Header="Trace _Events" x:Name="mnuTraceEvents" IsCheckable="True" Checked="mnuTraceEvents_Checked" Unchecked="mnuTraceEvents_Unchecked"></MenuItem>
                    <MenuItem Header="_Clear Events" x:Name="mnuClear" Click="mnuClear_Click"/>
                </MenuItem>
            </Menu>
        </Grid>
        <Grid Grid.Row="0" HorizontalAlignment="Right">
            <Button Content="Refresh" x:Name="Refresh" Margin="6,0,0,0" Click="Refresh_Click" VerticalAlignment="Center"/>
        </Grid>
        <DataGrid Grid.Row="1" Name="lstItems" ItemsSource="{Binding}" SelectionMode="Extended" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" 
                 Width="Auto" Height="Auto" AutoGenerateColumns="False"
                 ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto">
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding Path=PropertyName}" Header="PropertyName" />
                <DataGridTextColumn Binding="{Binding Path=PropertyValueAtTime}" Header="PropertyValueAtTime" />
                <DataGridTextColumn Binding="{Binding Path=EventArgsTypeName}" Header="EventArgsTypeName" />
                <DataGridTextColumn Binding="{Binding Path=ObjectInstanceName}" Header="ObjectInstanceName" />
                <DataGridTextColumn Binding="{Binding Path=ObjectInstanceTypeName}" Header="ObjectInstanceTypeName" />
                <DataGridTextColumn Binding="{Binding Path=TargetName}" Header="TargetName" />
                <DataGridTextColumn Binding="{Binding Path=TargetTypeName}" Header="TargetTypeName" />
                <DataGridTextColumn Binding="{Binding Path=TargetMethodName}" Header="TargetMethodName" />
            </DataGrid.Columns>            
        </DataGrid>
    </Grid>
</UserControl>
